package com.hippoDocker.consulorder.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @ClassName PaymentController
 * @Description TODO
 * @Author hippoDocker
 * @Date 2022/6/1 16:56
 **/
@RestController
@RequestMapping("/order")
public class ConsulOrderController {
    @Resource
    private RestTemplate restTemplate;
    public static final String PAYMENT_URL = "http://cloud-provider-payment";

    @GetMapping("/getPayment")
    public String createPayment() {
        return restTemplate.getForObject(PAYMENT_URL + "/payment/getPayment", String.class);
    }


}
